package model.bo;

import java.util.ArrayList;

import model.bean.Dictionary;
import model.bean.Language;
import model.dao.GetLanguageDAO;
import model.dao.GetWordDAO;

public class SearchWordBO {
	GetLanguageDAO getLanguageDAO = new GetLanguageDAO();
	GetWordDAO getWordDAO = new GetWordDAO();

	
	public ArrayList<Language> GetListLang() {
		return getLanguageDAO.GetListLanguage();
	}
	
	public ArrayList<Dictionary> GetListWord(String langSource, String langTarget){
		
//		return getWordDAO.GetListWord();
		return getWordDAO.GetListWord(langSource, langTarget);
		
	}
	public ArrayList<Dictionary> GetListWord(String itemSearch, String langSource, String langTarget){
		return getWordDAO.GetListWord(itemSearch, langSource, langTarget);
	}
	public ArrayList<Dictionary> GetListWordChoose(String begin, String langSource, String langTarget){
		if("All".equals(begin)){
			return getWordDAO.GetListWord(langSource, langTarget);
		}
		else{
		return getWordDAO.GetListWordChoose(begin, langSource, langTarget);
		}
	}
	
}
